unit AppSettings;

interface

uses
  PtSettings, PtSettingsCommon;

type
  TUISettings = class(TSettingsGroup)
  private
    fMainForm: TRectSettings;
  public
    constructor Create(const AName: string; const AParent: TSettingsGroup = nil); override;
    property  MainForm: TRectSettings read fMainForm;
  end;

  TStorageType = (stIniFile, stXMLFile, stRegistry);

  TAppSettings = class(TSettingsGroup)
  private
    fStorageType: TStorageType;
  published
    property  StorageType : TStorageType  read fStorageType write fStorageType;
  end;

  TSettings = class(TSettingsGroup)
  private
    fUI: TUISettings;
    fApp: TAppSettings;
  public
    constructor Create; reintroduce;
    property  UI  : TUISettings   read fUI;
    property  App : TAppSettings  read fApp;
  end;

implementation

{ TUISettings }

constructor TUISettings.Create(const AName: string; const AParent: TSettingsGroup);
begin
  inherited;
  //  Create child modules
  fMainForm := TRectSettings.Create('MainForm', Self);
end;

{ TSettings }

constructor TSettings.Create;
begin
  inherited Create('PtSettingsDemo');
  //  Create child modules
  fUI   := TUISettings.Create('UI', Self);
  fApp  := TAppSettings.Create('App', Self);
end;

end.
